Present computer controlled systems and mathematical document editors allow users to enter expressions and equations, including symbolic expressions, in documents on a computer system and to perform calculations using these expressions and equations. For example, the well known Maple symbolic engine developed by Waterloo Maple Software, Inc. of Ontario, Canada, and the Mathematica program produced by Wolfram, Inc., are computer programs that allow users to enter complex mathematical expressions and calculate results. Both these products use sequential command line input, where the sequence in which the expressions are entered has meaning and is relevant to the result calculated. In these systems, there is no logical connection between the output and the input unless the user makes the connection. Each expression is entered and processed in the order that it is entered. If a user wishes to modify a previously entered expression, the user can, for example, place the cursor on that expression on the screen, modify the expression, and then reenter the modified expression. However, if the user wishes the modification (or the result of the modified expression) to affect or be applied to other previously entered expressions, the user must then reenter those expressions.
Specialized computer systems and mathematical document editors exist for performing mathematical and statistical calculations that allow input to be entered "freeform" in any order and placed in any position on the computer screen, herein called "mathematical document editors". The input can be mathematical, scientific and statistical expressions, as well as text, diagrams and graphs. In these systems, the document on which the expressions are entered can be considered to be a virtual white board. The expressions are entered by a user on the white board (i.e., the open document displayed on the computer screen), using known graphical user interfaces, such as, for example, the user interface of Microsoft, Inc.'s Windows operating system. A document can be displayed, printed, edited, and saved as a file in a computer memory.
A user can enter expressions in the form that the user would write such expressions on the white board or sheet of paper, using common mathematical notations, rather than in the form of statements or equations used in programming languages or spreadsheets. Mathematical document editors have an intelligent editor that interprets the expressions that are in the document. The intelligent editor provided by mathematical document editors can "understand" and interpret mathematical expressions as would a human mathematician, for example, by reading and interpreting a series of expressions in a document from left to right and from top to bottom. An expression compiler of the mathematical document editor links related expressions. For example, if the user enters the expression EQU x:=5 (1)
in a document on a screen and then enters the expressions EQU y:=x-1 (2) EQU 2*y= (3a)
the system would automatically display the result for expression (3a), i.e., "8". Expression (3a) would be shown in the document as EQU 2*y=8 (3b)
To arrive at this result, the mathematical document editor would determine that expression (3a) needs the value of y, which is calculated at expression (2), which in turn needs the value of x, calculated at expression (1). Accordingly, the system, in particular, the expression compiler, understands the mathematical relationships between expressions (1) to (3). The mathematical document editor will reach the same result regardless of the order in which expressions (1) to (3a) are entered by the user. What is important is the positioning of the expressions in the document. As stated above, expressions are interpreted by a human from left to right and from top to bottom within a document. Thus, expressions (1) to (3a) can be positioned logically in the document (with text between the expressions if necessary). For example, expression (1) may be placed in the top left corner of the document, expression (2) may be immediately to the right, and expression (3a) may be in the bottom center.
It is known in existing mathematical document editors to provide "live" document capabilities. When a change is made to a variable or an expression in a live document, all related expressions are also updated, in real-time. For example, if the user edits equation (1) above, using graphical user interface techniques, so that expression (1) now reads EQU x:=4 (1)
then expressions (2) and (3b) are automatically recalculated in real-time, and a new result for expression (3) is automatically displayed in the document, i.e, EQU 2*y=6 (3c)
A document that allows for automatic recalculation of related mathematical expressions in a document whenever an expression is edited, modified, added, deleted or changed is known as a live document. The computerized system that provides live document features for mathematical document editors can be called a live mathematical document editor. The Maple symbolic engine and the Mathematica program, mentioned above, do not have "live" document capabilities, and can not be regarded as live mathematical document editors.
A system illustrative of a current live mathematical document editor is the Mathcad system, version 3.1 for Windows, by MathSoft, Inc., of Cambridge, Mass., released in 1991.
It is noted for clarity that the expression reference numbers, e.g., "(1)" need not be displayed in the live document and are included in this patent application for ease of reference to expressions. In a live document, the computer system "knows" the relationship between related equations. (A user could enter such reference numbers in a live document as text, but this would not effect the operation of the intelligent editor or expression compiler when evaluating expressions.)
As stated above, a user reads the expressions in a live document as the user would read expressions written on a white board or a sheet of paper. A user can write expressions in the live document in formats and position that are familiar to mathematician and engineers. Live documents can be edited in a similar fashion to how one would edit a document using a word processor. For example, when a user updates an expression, the user can, for example, place the cursor on the part of the expression that the user wishes to update, and add and delete variables, values, etc. in the expression. Live documents, and editing thereof, are explained in detail in the Mathcad 3.1 User's Guide Windows Version, published by Mathsoft, Inc. of Cambridge, Mass., which is expressly incorporated herein by reference.
It is known in live mathematical document editors to include a symbolic algebra engine ("SAE"), also known as a symbolic processor. (The Maple symbolic engine can be regarded as an SAE.) An SAE allows a user to undertake symbolic manipulation and/or calculation of expressions. There is a difference between a function that performs numerical evaluation and manipulation of an expression or series of expressions, and a function that performs symbolic calculation or manipulation of an expression or series of expressions. An example of a function that performs symbolic manipulation of an expression is the "expand" function. (Other symbolic calculations that can be performed on equations include solving an equation for a variable, integrating a function, simplifying an expression, factoring an expression and the like.) For example, given the expression EQU (a+b).(a+b) (4)
one could expand this expression, and arrive at the mathematically equivalent expression EQU a.sup.2 +2.a.b+b.sup.2 ( 4a)
However, one could not numerically evaluate expression (4) unless given the values for variables a and b.
Although live mathematical document editors include an SAE for symbolic manipulations and calculations, such symbolic calculations are not "live" calculations (even though the system can perform live numerical calculations. ) For example, suppose the user enters onto the live document the expression EQU (x+1).sup.3 ( 8)
The user may give a numerical value for x, for example, by entering the expression EQU x:=2 (7)
above or to the left of expression (8). If numerical calculation was required, expression (8) would read in a live document as follows EQU (x+1).sup.3 =27 (9a)
If the user modified expression (7), so that x now had the value of "1" then expression (9a) would be automatically recalculated to read EQU (x+1).sup.3 =8 (9b)
Alternatively, if x was given a value of "y+z" in expression (7), it would be impossible to numerically evaluate expression (8), and in a live document, no resultant would be displayed. The above are examples of the live numerical calculation features of live mathematical document editors. However, in present live mathematical document editors, if the user wished to evaluate expression (8) symbolically, for example, to expand expression (8), the SAE would calculate the answer, and display it in the document as follows: EQU x.sup.3 +3x.sup.2 +3x+1 (10)
This, however, is not a live symbolic calculation. In existing live mathematical document editors, expressions are passed to the SAE, are processed by the SAE, and the results are returned for display on the document. Thus, expression (10) would be displayed underneath expression (8). However, if an expression on which a symbolic function has taken place is modified, then the result of the symbolic function performed on that expression is not modified. Thus, in the above example, if expression (8) is changed to read EQU (x+1).sup.4 ( 8a)
then expression (10), the result of the expansion, is not changed. A user must re-select expression (8/8a), reactivate the SAE, and request that the SAE expand expression (8/8a) again. In the document, the new expansion will be displayed under expression (8a), along with previous expansion, i.e., expression (10) above. That is, the previous expansion of equation (8), i.e., equation (10), will still be displayed in the document as shown above, unchanged. Thus, if an expression on which a subsequent symbolic calculation relies or depends is changed, the result of the symbolic computation does not change. Accordingly, a user viewing the updated document would see an incorrect symbolic computation. That is, symbolic calculations are not live.
As another example, if the live document included expression (4) above, and the user requested that expression (4) be expanded, the result would be expression (5) above. Suppose the user then modified the live document by adding an expression "a:=c+1" above expression (4) in the document. The correct result of the expansion of expression (4) is now EQU c.sup.2 +2.c+2.c.b+1+2.b+b.sup.2
but this would not be displayed. The old, incorrect result of the expansion of expression (4) would be shown, and, in existing live document editors, even if the user re-requested the expansion of expression (4), expression (5) would still be returned because the SAE is unaware that "a" now has the value "c+1". Moreover, old expression (5) would still be displayed.
Thus, existing systems that have live document capabilities do not enable sophisticated symbolic manipulation of equations where relevant and needed information to the symbolic manipulation is contained in other related equations. For example, suppose the user enters the expressions EQU n:=2 (5) EQU (y.sup.n -1) (6)
and then the user requests that the SAE factorize expression (6). The SAE of existing live mathematical document editors will not be able to do so--the SAE does not know that n was given a value in expression (5). As another example, the SAE does not know, when expanding expression (8), that x was defined in expression (7), and no change results to expression (10) when expression (7) is modified. Accordingly, existing systems do not allow the "live" document features to be used when performing symbolic manipulation of equations.
The process of symbolic evaluation takes place in a live mathematical document editor as follows. The user selects an expression and activates the SAE, for example, by selecting an "evaluate symbolically" command from a "Symbolic" menu of commands. The selected expression is passed to the SAE, as if the selected expression has been cut from the document, and evaluated out of the context from which the selected expression was taken. The result of the symbolic evaluation is returned by the SAE, for display immediately underneath the selected equation. Thus, present live mathematical document editors do not perform "live" document functions on symbolic equations.
In existing live document systems, the SAE is separate from the editor that allows entry of equations and the expression compiler that creates linkages between related expressions. Accordingly, the SAEs of existing live document systems can merely take expressions out of the document in use (and accordingly, out of the context in which the expression is placed), perform the symbolic manipulation, and return the result to the document. There are no dynamic links between an expression and the result of the symbolic manipulation of the expression--when an expression is modified, added or deleted, any expressions that require symbolic manipulations that depend on the information that is modified, added or deleted are not automatically recalculated.
Accordingly, there is a need for computerized systems that can perform live symbolic calculations.